package cn.fzkj.gulimall.auth.feign;

import cn.fzkj.common.utils.R;
import cn.fzkj.gulimall.auth.entity.LoginEntity;
import cn.fzkj.gulimall.auth.entity.RegisterEntity;
import cn.fzkj.gulimall.auth.entity.base.SocialUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @DESCRIPTION 用户服务的远程调用接口
 * @Author yaya
 * @DATE 2022/8/21
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    @RequestMapping(value = "/member/member/register", method = RequestMethod.POST)
    R register(@RequestBody RegisterEntity entity);

    @RequestMapping(value = "/member/member/login", method = RequestMethod.POST)
    R login(@RequestBody LoginEntity entity);

    @RequestMapping(value = "/member/member/oauth/login", method = RequestMethod.POST)
    R oauthLogin(@RequestBody SocialUser user);

}
